//
//  XYCollectionView.h
//  XYSfxyxuSwift
//
//  Created by 许洋 on 2018/4/13.
//  Copyright © 2018年 许洋. All rights reserved.
//

#import <UIKit/UIKit.h>
@class XYCollectionView;

@protocol XYCollectionViewDelegate <NSObject>
- (UICollectionViewCell *)xy_collectionView:(XYCollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)xy_collectionView:(XYCollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;

- (UICollectionViewCell *)xy_cellForItemAtIndexPath:(NSIndexPath *)indexPath;

@end
@interface XYCollectionView : UIView

@property (nonatomic,assign) CGSize itemSize;

@property (nonatomic,assign) UIEdgeInsets sectionInset;

@property (nonatomic,strong) NSArray *dataSource;

@property (nonatomic,strong) UICollectionViewFlowLayout *currentLayout;

@property (nonatomic,weak) id <XYCollectionViewDelegate> delegate;

- (UICollectionViewCell *)xy_dequeueReusableCellWithReuseIdentifier:(NSString *)reuseIdentifier forIndexPath:(NSIndexPath *)indexPath;

@end
